package com.weirong.smartvault.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
@Entity
@Table(name="in_storage_detail_log")
public class InStorageDetailLog {

    @Id
    @GeneratedValue(strategy= GenerationType.AUTO)
    private Integer id;
    
    @ManyToOne
	@JoinColumn(name = "in_storage_id")
	@NotFound(action = NotFoundAction.IGNORE)
	private InStorageLog inStorageLog;
    
    @Column(name = "type_code")
    private String typeCode;
    
    @Column(name = "denomination_value")
    private Integer denominationValue;
    
    private Integer amount;
    
    @OneToOne
	@JoinColumn(name = "box_id")
	@NotFound(action = NotFoundAction.IGNORE)
	private CashboxRealtime box;
}
